﻿using System;

namespace TlsService
{
    public class TlsOperate
    {


        public int NowTime
        {
            get
            {
                DateTime currentTime = DateTime.Now;
                DateTime epochTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
                TimeSpan timeSpan = currentTime - epochTime;
                double timestamp = timeSpan.TotalSeconds;
                return (int)timestamp;
            }
        }

        public string Uuid
        {
            get
            {
                return Guid.NewGuid().ToString();
            }
        }

        public int AfterDate
        {
            get
            {
                DateTime epochTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
                DateTime nextDate = DateTime.Now.AddDays(1);
                TimeSpan timeSpan = nextDate -epochTime ;
                double timestamp = timeSpan.TotalSeconds;
                return (int)timestamp;
            }
        }

        public int Random
        {
            get
            {
                Random random = new Random();
                int randomNum = random.Next(10_000_000_0, 99_999_999_9);
                return randomNum;
            }
        }
        
     
     
    }
}